Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
electron-download
Advanced tools
Downloads an Electron release zip from GitHub.
Used by electron-prebuilt and electron-packager
$ npm install --global electron-download
$ electron-download --version=0.31.1
var download = require('electron-download')
download({
version: '0.25.1',
arch: 'ia32',
platform: 'win32',
cache: './zips' // defaults to <user's home directory>/.electron
}, function (err, zipPath) {
// zipPath will be the path of the zip that it downloaded.
// If the zip was already cached it will skip
// downloading and call the cb with the cached zip path.
// If it wasn't cached it will download the zip and save
// it in the cache path.
})
If you don't specify arch
or platform
args it will use the built-in os
module to get the values from the current OS. Specifying version
is mandatory. If there is a SHASUMS256.txt
file available for the version
, the file downloaded will be validated against its checksum to ensure that it was downloaded without errors.
You can also use electron-download
to download the chromedriver
, ffmpeg
,
mksnapshot
, and symbols assets for a specific Electron release. This can be
configured by setting the chromedriver
, ffmpeg
, mksnapshot
, or
symbols
property to true
in the specified options object. Only one of
these options may be specified per download call.
You can force a re-download of the asset and the SHASUM
file by setting the
force
option to true
.
If you would like to override the mirror location, three options are available. The mirror URL is composed as url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME
.
You can set the ELECTRON_MIRROR
or NPM_CONFIG_ELECTRON_MIRROR
environment variable or mirror
opt variable to use a custom base URL for grabbing Electron zips. The same pattern applies to ELECTRON_CUSTOM_DIR
and ELECTRON_CUSTOM_FILENAME
:
## Electron Mirror of China
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
## or for a local mirror
ELECTRON_MIRROR="https://10.1.2.105/"
ELECTRON_CUSTOM_DIR="our/internal/filePath"
You can set ELECTRON_MIRROR in .npmrc
as well, using the lowercase name:
electron_mirror=https://10.1.2.105/
FAQs
download electron prebuilt binary zips from github releases
The npm package electron-download receives a total of 21,995 weekly downloads. As such, electron-download popularity was classified as popular.
We found that electron-download demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.